home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
014
/
tail.arc
/
TAIL.DOC
next >
Wrap
Text File
|
1984-02-03
|
2KB
|
53 lines
/* TAIL.C Program to show the last x characters in a file.
Copyright (c) 1984, Gordon Lee Waite
413 W. Pleasant Street
Maquoketa, IA 52060
Utility: TAIL
Purpose: This utility displays a given number of characters
from the end (tail) of an ascii file.
Summary: tail filename #
Arguments: name of desired file
and
number of characters to be shown
Options: none
Description
The tail program will display a given number of characters,
as counted from the end of the file. Tail finds the Ctrl-Z
End-of-File marker in the last 512 bytes of the file.
From there, the program counts backwards the number of
characters specified in the command line. Then the characters
are displayed on the screen.
The program counts the CR-LF pair at the end of each line
as two characters. So if you specify a number of 1 or 2,
you will probably get no output from this program, as the
last line may have a CR-LF pair before the EOF marker.
Tail is a handy and quick way to examine the last few lines
of an ASCII file (like a word processing file) without
having to invoke an editor, or page through the entire
file listing.
Operation of TAIL with a non-ASCII file is not recommended,
but TAIL does no checking on filename extensions.
This program was compiled with the Manz Aztec C Compiler.
The compile and link process is as follows:
c86 tail.c
as86 -o tail.o tail.asm
del tail.asm
ln -o tail.exe tail.o gorlib.lib dosa.lib videoa.lib libc.lib
del tail.o
*/